<div id="body-wrapper"> <!-- Wrapper for the radial gradient background -->
		
		<?php require 'sidebar.php';?>
		
		<div id="main-content"> <!-- Main Content Section with everything -->
			
			<noscript> <!-- Show a notification if the user has disabled javascript -->
				<div class="notification error png_bg">
					<div>
						老兄，javascript被禁止执行！换换浏览器先！
					</div>
				</div>
			</noscript>
			
			<div class="content-box"><!-- Start Content Box -->
				
				<div class="content-box-header">
					
					<h3>设置概况</h3>
					
					<!-- <ul class="content-box-tabs">
						<li><a href="#tab1" class="default-tab">列表</a></li> href must be unique and match the id of target div
						<li><a href="#tab2">新建</a></li>						
					</ul> -->
					
					<div class="clear"></div>
					
				</div> <!-- End .content-box-header -->
				
				<div class="content-box-content">
					
					<div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab -->
						
						<?php 
		if($this->input->get('action') == 'ok'){
			
		
						?>
						<div class="notification success  png_bg">
							<a href="#" class="close"><img src="/resources/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
							<div>
								操作成功！
							</div>
						</div>
						<?php  

					}
						?>

						
						<form id="frmadd" name="frmadd" enctype="multipart/form-data" action="<?php echo site_url('sysadmin/sysset/add') ?>" method="post">
							<input  type="hidden" id="domain" name="domain" value="<?php echo SITE_DOMAINNAME ?>" /> 
							<fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns -->
								
								<p>
									<label>客服qq</label>
									<?php 
										if($data){
// print_r($data);
										}
									?>
										<input class="text-input small-input" type="text" id="clientqq" name="clientqq" value="<?php if($data && $data->clientqq) echo str_replace(',', ' ', $data->clientqq) ?>" /> <span class="input-notification png_bg"></span> <!-- Classes for input-notification: success, error, information, attention -->
										<br /><small>多个qq号请用空格隔开，建议2-3个</small>
								</p>
								<p>
									<label>首页图片</label>

									<input class="text-input small-input" type="text" id="indexpageimages" name="indexpageimages" value="<?php if($data && $data->indexpageimages){ 
									echo $data->indexpageimages;} ?>" />
									<br />
									<?php 
									if($data && $data->indexpageimages){ 
										$imgarr = explode(',', $data->indexpageimages);
									echo '当前已有'.count($imgarr ) .' 个图片 <br/>';

									foreach ($imgarr as $key => $value) {
										echo '<img src="/data/indexpageimages/'.$value, '" style="width:150px;height:120px;" />';
									}
								}

									?>
									<br />
									
									1 <input type="file" name="image0" /><br/>
									2 <input type="file" name="image1" /><br/>
									3 <input type="file" name="image2" /><br/>
									4 <input type="file" name="image3" />
										
										<span class="input-notification png_bg"></span> <!-- Classes for input-notification: success, error, information, attention -->
										<br /><small></small>
								</p>
								<p>
									<label>底部关键词</label>
									<textarea  style="visibility:hidden;" id="bottomlinks" name="bottomlinks" cols="79" rows="10"></textarea>
									<br /><small>本部设置的关键词链接，将在网站所有页面底部显示，请注意美观</small>
								</p>
															
								<p>
									<input class="button" type="submit" value="编辑" id="sbm" />
								</p>
								
							</fieldset>
							
							<div class="clear"></div><!-- End .clear -->
							
						</form>
						
					</div> <!-- End #tab1 -->
					<div class="tab-content" id="tab2">
					<div id="menuContent" class="menuContent" style="display:none; position: absolute; background:#FFF">
					</div>
						
						<div id="menuContent" class="menuContent" style="display:none; position: absolute; background:#FFF">
						</div>
						
					</div> <!-- End #tab2 -->
					       
					
				</div> <!-- End .content-box-content -->
				
			</div> <!-- End .content-box -->
			
			<div class="content-box column-left">
				
				<div class="content-box-header">
					
					<h3>功能介绍</h3>
					
				</div> <!-- End .content-box-header -->
				
				<div class="content-box-content">
					
					<div class="tab-content default-tab">
					
						<h4>设置管理</h4>
						<p>
						在这里更改客服qq号，图片等操作
						</p>
						
					</div> <!-- End #tab3 -->        
					
				</div> <!-- End .content-box-content -->
				
			</div> <!-- End .content-box -->
			
			<div class="clear"></div>
			
			
			
			<?php require_once 'copy.php';?>
			
		</div> <!-- End #main-content -->
		
	</div>
	<script type="text/javascript">
	
	var editor;
	$(function(){
		if(!editor){
			editor = KindEditor.create('textarea[name="bottomlinks"]');		
			<?php
			if($data->bottomlinks){
				?>
				editor.insertHtml('<?php echo $data->bottomlinks ?>');
				<?php
			}else{
				
			}
			?>	
		}else{
			editor.html('');

		}
	})  ;
	$h.include([
            '/resources/scripts/kindeditor/kindeditor-min.js',
            '/resources/scripts/kindeditor/lang/zh_CN.js'
            ]);
	</script>